package com.SNQ.project.English_speaking_learning_system.mapper;

import com.SNQ.project.English_speaking_learning_system.aspect.AutoFill;
import com.SNQ.project.English_speaking_learning_system.common.enumeration.OperationType;
import com.SNQ.project.English_speaking_learning_system.pojo.entity.ReadingRecord;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ReadingRecordMapper {

    @Insert("insert into reading_record (user_id, article_id, reading_time, score, status, feedback, audio_url) " +
            "values " +
            "(#{userId},#{articleId},#{readingTime},#{score},#{status},#{feedback},#{audioUrl})")
    @AutoFill(value = OperationType.INSERT)
    void insert(ReadingRecord readingRecord);

}
